import request from '@/utils/request';
// request.defaults.timeout = 30000

// 公众号图文列表（草稿+已发表）
export const getOfficialArticleList = (data: any) => {
    return request({
        url: '/scrm-api/console/component/offical/article-list',
        method: 'POST',
        data
    });
};
// 同步公众号图文  已废弃（功能不做了 2022-9-2）
export const officialSync = (data: any) => {
    return request({
        url: '/scrm-api/console/component/offical/sync',
        data
    });
};
// 同步公众号图文-公众号列表
export const officialAccountList = () => {
    return request({
        url: 'scrm-api/console/component/offical/account-list'
    });
};
// 同步公众号图文-公众号列表
export const createMassOfficialAccount = (data: any) => {
    return request({
        url: '/scrm-api/console/component/offical/create-mass',
        method: 'POST',
        data,
        timeout: 60000
    });
};
// 草稿箱-详情
export const getOfficalArticleDetail = (data: any) => {
    return request({
        url: '/scrm-api/console/component/offical/article-detail',
        method: 'POST',
        data
    });
};
// 草稿箱-群发
export const groupMassOffical = (data: any) => {
    return request({
        url: '/scrm-api/console/component/offical/group-mass',
        method: 'POST',
        data,
        timeout: 60000
    });
};
// 草稿箱-预览
export const previewOffical = (data: any) => {
    return request({
        url: '/scrm-api/console/component/offical/preview',
        method: 'POST',
        data
    });
};
// 草稿箱-预览
export const delOfficalDraft = (params: any) => {
    return request({
        url: '/scrm-api/console/component/offical/draft-del',
        params
    });
};
// 草稿箱-预览
export const editOfficalDraft = (data: any) => {
    return request({
        url: '/scrm-api/console/component/offical/article-edit',
        method: 'POST',
        data,
        timeout: 60000
    });
};
// 列表重新群发接口
export const againSendMass = (data: any) => {
    return request({
        url: 'scrm-api/console/component/offical/mass-again',
        method: 'POST',
        data
    });
};
